<template>
  <!-- form -->
  <el-form ref="form" class="settingForm" :model="form" label-width="80px">
    <el-form-item label="公司名称">
      <el-input v-model="form.name" disabled />
    </el-form-item>
    <el-form-item label="公司地址">
      <el-input v-model="form.companyAddress" disabled />
    </el-form-item>
    <el-form-item label="公司电话">
      <el-input v-model="form.companyPhone" disabled />
    </el-form-item>
    <el-form-item label="邮箱">
      <el-input v-model="form.mailbox" disabled />
    </el-form-item>
    <el-form-item label="备注">
      <el-input v-model="form.remarks" disabled />
    </el-form-item>
  </el-form>
</template>

<script>
import { mapGetters } from 'vuex'
import { getCompanyById } from '../../../api/departments'
export default {
  name: 'SettingForm',
  data() {
    return {
      form: {}
    }
  },
  computed: {
    ...mapGetters(['userInfo'])
  },
  async created() {
    const res = await getCompanyById(this.userInfo.id)
    this.form = res
    // this.form = this.userInfo
  }
}
</script>

<style lang="scss">
.settingForm {
  margin: 30px 100px;
  width: 600px;
}
</style>
